package cn.texous.demo.demojvm.list;

import java.util.Arrays;
import java.util.List;
import java.util.UUID;

/**
 * insert description here.
 *
 * @author Showa.L
 * @since 2019/11/14 14:02
 */
public class TestFor {

    public static void main(String[] args) {
        new TestFor().testForEach();
        new TestFor().testFor();
        System.out.println(UUID.randomUUID().toString());
    }

    private void testForEach() {
        for (Integer i : getList()) {
            System.out.println(i);
        }
    }

    private void testFor() {
        for (int i = 0; i < getList().size(); i++) {

        }
    }

    private List<Integer> getList() {
        System.out.println("get list");
        return Arrays.asList(1,2,3,4,5);
    }

}
